import { Input } from 'antd';
import { Component } from 'react';
import pubSub from 'pubsub-js'
class App extends Component {
  add = (e) => {
    console.log(this.props,'this.props');
    this.props.addTodo({id:new Date().getTime() ,title:e.target.value,done:false})
    pubSub.publish('add','1233')
  }
  
  render() {
    return (
      <Input placeholder="Basic usage" onPressEnter={this.add} />
    );
  }
  
}

export default App;
